package com.lancoo.examview.homework;

import android.os.Bundle;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import com.lancoo.answer.model.TaskState;
import com.lancoo.examview.R;
import com.lancoo.examview.exam.ExamActivity;
import com.lancoo.examview.test.PaperActivity;

/**
 * Created by pengmi on 2022/2/21 16:32
 * Description:试卷类型数据界面
 */
public class HomeWorkActivity extends AppCompatActivity {

    private long subTime;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_homework);
        findViewById(R.id.btn1).setOnClickListener(v -> gotoExamActivity("人工组卷.json",0));
        findViewById(R.id.btn2).setOnClickListener(v -> gotoExamActivity("课后作业2.json",0));

    }


    private void gotoExamActivity(String jsonFileName,int trainSence){
        if(System.currentTimeMillis()-subTime<200){
            return;
        }
        subTime=System.currentTimeMillis();

        PaperActivity.launch(this,jsonFileName, TaskState.TRAINING,trainSence);
    }



}

